<template>
    <el-form :model="logAccount" ref="accountForm" :rules="rules" label-width="80px">
        <el-form-item label="用户名">
            <el-input v-model="logAccount.username"></el-input>
        </el-form-item>
        <el-form-item label="昵称">
            <el-input v-model="logAccount.nick"></el-input>
        </el-form-item>
        <el-form-item label="时间" prop="logtime">
            <el-input v-model="logAccount.logtime"></el-input>
        </el-form-item>
        <el-form-item label="操作员ID" prop="m_id">
            <el-input v-model="logAccount.m_id"></el-input>
        </el-form-item>
        <el-form-item label="类型" prop="category">
            <el-input v-model="logAccount.category"></el-input>
        </el-form-item>
        <el-form-item label="内容" prop="content">
            <template #default="scope">
                <addEditor v-model="logAccount.content" :logAccount="logAccount"></addEditor>
            </template>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="onLogAddSubmit">确定</el-button>
        </el-form-item>
    </el-form>
</template>

<script setup lang="ts">
import { AddLog } from '../hooks/log'
import addEditor from '../components/AddEditor.vue';
const { logAccount, rules, onLogAddSubmit } = AddLog()
</script>

<style scoped>
.el-form {
    width: 600px;
    height: 400px;
}
</style>
